import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('@/views/auth/Login.vue')
    },
    {
      path: '/confirmAuthorize',
      name: 'confirmAuthorize',
      component: () => import('@/views/auth/Authorize.vue'),
      meta: { requiresAuth: true }
    },
    {
      path: '/register',
      name: 'register',
      component: () => import('@/views/user/Register.vue')
    },
    {
      path: '/userCenter',
      name: 'userCenter',
      component: () => import('@/views/user/Center.vue'),
      meta: { requiresAuth: true }
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/Home.vue'),
      meta: { requiresAuth: true }
    }

  ]
})

export default router